import callFeedback from "@/components/common/modalFeedback";
import { CATEGORY } from "@/components/pages/wheel";
import { Button } from "antd-mobile";
import React from "react";

export default function FeedbackComp({ item, actions, handler }) {
  const m = callFeedback({
    bodyClassName: `price-result-modal close-hidden`,
    // header: <>{CATEGORY[item?.category]?.feedback}</>,
    content: <div className="inner">
      <div className="header">
        {CATEGORY[item?.category]?.feedback}
      </div>
      {/* <div className="thumb">
        <img src={item.icon} alt="" />
      </div> */}
      <div className="title">{item?.name}</div>
    </div>,
    actions: actions || [
      <Button key={`cancel`} onClick={e => m.close()} size={`small`} shape={`rounded`}
        className="act-btn act-btn-bevel">确定</Button>
    ],
    closeOnAction: true,
    closeOnMaskClick: false,
  })

  return m
}